#ifndef __BSP_GXHTC3_H__
#define __BSP_GXHTC3_H__
#include <stm32f1xx.h>
//SHTC3地址
#define SHTC3_ADDRESS                   0x70

//SHTC3 命令
#define SHTC3_WIRTE_CMD                 ((SHTC3_ADDRESS<<1)&0xFE)
#define SHTC3_READ_CMD                  ((SHTC3_ADDRESS<<1)|0x01)

#define	SHTC3_SOFT_RESET_CMD	        0x805D//软件复位命令
#define	SHTC3_READ_ID_CMD	            0xEFC8//读取SHTC3 ID命令
#define	SHTC3_WAKE_UP_CMD	            0x3517//将芯片从睡眠模式唤醒命令
#define	SHTC3_SLEEP_CMD	                0xB098//使芯片进入休眠命令

//Normal Mode Clock Stretching Enable Measurement Command
#define	SHTC3_NOR_READ_TEMP_FIR_EN_CMD	0x7CA2//
#define	SHTC3_NOR_READ_HUM_FIR_EN_CMD	0x5C24//

//Normal Mode Clock Stretching Disable Measurement Command
#define	SHTC3_NOR_READ_TEMP_FIR_DIS_CMD	0x7866//
#define	SHTC3_NOR_READ_HUM_FIR_DIS_CMD	0x58E0//

//Low Power Mode Clock Stretching Enable Measurement Command
#define	SHTC3_LOW_READ_TEMP_FIR_EN_CMD	0x6458//
#define	SHTC3_LOW_READ_HUM_FIR_EN_CMD	0x44DE//

//Low Power Mode Clock Stretching Disable Measurement Command
#define	SHTC3_LOW_READ_TEMP_FIR_DIS_CMD	0x609C//
#define	SHTC3_LOW_READ_HUM_FIR_DIS_CMD	0x401A//



//SHTC3 ID
#define _SHTC3_ID			            0x0807

//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
//函数声明
uint8_t Sthc3ReadHumiAndTemp(uint8_t* pHum, uint8_t * pTmp);
void sthc3_example(void);
#endif // !__BSP_GXHTC3_H__
